minetest.register_node("petroleum:source", {
	description = "Petroleum Source",
	inventory_image = minetest.inventorycube("petroleum.png"),
	drawtype = "liquid",
	tiles = {
		{
			name = "petroleum_source_animated.png",
			animation = {
				type = "vertical_frames",
				aspect_w = 16,
				aspect_h = 16,
				length = 3.0,
			},
		},
	},
	special_tiles = {
		-- New-style petroleum source material (mostly unused)
		{
			name = "petroleum_source_animated.png",
			animation = {
				type = "vertical_frames",
				aspect_w = 16,
				aspect_h = 16,
				length = 3.0,
			},
			backface_culling = false,
		},
	},
	paramtype = "light",
	--light_source = default.LIGHT_MAX - 1,
	walkable = false,
	pointable = false,
	diggable = false,
	buildable_to = true,
	drop = "",
	drowning = 1,
	liquidtype = "source",
	liquid_alternative_flowing = "petroleum:flowing",
	liquid_alternative_source = "petroleum:source",
	liquid_viscosity = 7,
	liquid_renewable = false,
	--damage_per_second = 4 * 2,
	post_effect_color = {a=128, r=64, g=64, b=64},
	groups = {
		flammable=1,
		lava=3, 
		liquid=2, 
		--hot=3, 
		--igniter=1
	},
})

minetest.register_node("petroleum:flowing", {
	description = "Flowing Petroleum",
	inventory_image = minetest.inventorycube("petroleum.png"),
	drawtype = "flowingliquid",
	tiles = {"petroleum.png"},
	special_tiles = {
		{
			name = "petroleum_flowing_animated.png",
			backface_culling = false,
			animation = {
				type = "vertical_frames",
				aspect_w = 16,
				aspect_h = 16,
				length = 3.3,
			},
		},
		{
			name = "petroleum_flowing_animated.png",
			backface_culling = true,
			animation = {
				type = "vertical_frames",
				aspect_w = 16,
				aspect_h = 16,
				length = 3.3,
			},
		},
	},
	paramtype = "light",
	paramtype2 = "flowingliquid",
	--light_source = default.LIGHT_MAX - 1,
	walkable = false,
	pointable = false,
	diggable = false,
	buildable_to = true,
	drop = "",
	drowning = 1,
	liquidtype = "flowing",
	liquid_alternative_flowing = "petroleum:flowing",
	liquid_alternative_source = "petroleum:source",
	liquid_viscosity = 7,
	liquid_renewable = false,
	--damage_per_second = 4 * 2,
	post_effect_color = {a=220, r=64, g=64, b=64},
	groups = {
		flammable=1,
		lava=3, 
		liquid=2, 
		--hot=3, 
		--igniter=1, 
		not_in_creative_inventory=1
	},
})

minetest.register_alias("petroleum"	, "petroleum:source")
minetest.register_alias("petroleo"	, "petroleum:source")
minetest.register_alias("oleo"		, "petroleum:source")

--[[
minetest.register_ore({
	ore_type       = "scatter",
	ore            = "petroleum:source",
	wherein        = "default:stone",
	clust_scarcity = 24*24*24,
	clust_num_ores = 27,
	clust_size     = 6,
	y_max          = -16,
	y_min          = -31000,
	flags          = "absheight",
})
]]--

--Generation
minetest.register_ore({
	ore_type       = "scatter",
	ore            = "petroleum:source",
	wherein        = "default:stone",
	clust_scarcity = 24*24*24,
	clust_num_ores = 3,
	clust_size     = 2,
	height_max     = -10,
	height_min     = -31000,
})


